<form class="form-horizontal" id="info-form" method="post" action="{{ editUrl }}">
  <div class="form-group">
    <label for="name" class="col-sm-2 control-label">标题</label>
    <div class="col-sm-8">
      <input type="text" class="form-control" id="name" name="name" required="true" placeholder="标题" value="{{ material.filename }}">
    </div>
  </div>
  <div class="form-group">
    <label for="tags" class="col-sm-2 control-label">标签</label>
    <div class="col-sm-8">
      <input type="text" class="width-full select2-offscreen" id="tags" name="tags" value="{{ material.tags|join(',') }}" placeholder="标签" data-url="{{ path('tag_match') }}">
      <div class="help-block">{{'标签来自网校课程标签，由网校管理员统一管理。'|trans}}</div>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">简介</label>
    <div class="col-sm-8 controls">
      <textarea id="description" name="description" class="form-control" rows="6">{{ material.description|default('') }}</textarea>
    </div>
  </div>

  <div class="form-group">
    <label class="col-sm-2 control-label">共享</label>
    <div class="col-sm-8 controls">
      <div class="radio">
        <label>
          <input type="radio" name="isPublic" value="1" {% if material.isPublic|default(0) %}checked{% endif %}>
          共享到公共资料<span class="text-muted">（其他老师可以查看、预览、引用该资料）</span>
        </label>
      </div>
      <div class="radio">
        <label>
          <input type="radio" name="isPublic" value="0" {% if not material.isPublic|default(0) %}checked{% endif %}>
          仅自己可见
        </label>
      </div>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-8 controls">
      <button class="btn btn-fat btn-primary" id="info-save-btn" data-loading-text="正在保存..." type="submit">保存</button>
      <a class="btn btn-link js-back" style="color:#555">返回列表</a>
    </div>
  </div>
</form>